import request from '@/utils/request'

export function add(data) {
  return request({
    url: 'api/logisticsLoad/addOrSave',
    method: 'post',
    data
  })
}

export function del(ids) {
  return request({
    url: 'api/logisticsLoad/',
    method: 'delete',
    data: ids
  })
}

export function batchRemoveOrder(ids) {
  return request({
    url: '/api/logisticsLoad/batchRemoveOrder',
    method: 'post',
    data: ids
  })
}
export function edit(data) {
  return request({
    url: 'api/logisticsLoad/addOrSave',
    method: 'post',
    data
  })
}

export function copy(data) {
  return request({
    url: 'api/logisticsLoad/copy',
    method: 'post',
    data
  })
}

export function exportDe(data) {
  return request({
    url: 'api/logisticsLoad/export',
    method: 'post',
    data
  })
}

export function importDe(data) {
  return request({
    url: 'api/logisticsLoad/import',
    method: 'post',
    data
  })
}

export function passOrReject(data) {
  const obj = {
    url: 'api/logisticsLoad/passOrReject',
    method: 'post',
    data
  }
  return request(obj)
}

export function enableOrDisable(data) {
  const obj = {
    url: 'api/logisticsLoad/passOrReject',
    method: 'post',
    data
  }
  return request(obj)
}
export function basLineList(data) {
  const obj = {
    url: 'api/dropDown/basLineList/all',
    method: 'get',
    data
  }
  return request(obj)
}
export function childBasCustomerAreaList(data) {
  const obj = {
    url: 'api/dropDown/basCustomerAreaList',
    method: 'get',
    data
  }
  return request(obj)
}
export function detail(data) {
  const obj = {
    url: 'api/logisticsLoad/detail?id=' + data.id,
    method: 'get'
  }
  return request(obj)
}
export function removeOrder(data) {
  const obj = {
    url: 'api/logisticsLoad/removeOrder',
    method: 'post',
    data
  }
  return request(obj)
}
export function removeReturnBoxOrder(data) {
  const obj = {
    url: 'api/logisticsLoad/removeReturnBoxOrder',
    method: 'post',
    data
  }
  return request(obj)
}
export function removeCustomer(data) {
  const obj = {
    url: 'api/logisticsLoad/removeCustomer',
    method: 'post',
    data
  }
  return request(obj)
}
export function returnBox(data) {
  const obj = {
    url: 'api/logisticsLoad/returnBox',
    method: 'post',
    data
  }
  return request(obj)
}
export function unAccept(data) {
  const obj = {
    url: 'api/logisticsLoad/unAccept',
    method: 'post',
    data
  }
  return request(obj)
}
export function unReturnBox(data) {
  const obj = {
    url: 'api/logisticsLoad/unReturnBox',
    method: 'post',
    data
  }
  return request(obj)
}
export function isReceipt(data) {
  const obj = {
    url: 'api/logisticsLoad/isReceipt',
    method: 'post',
    data
  }
  return request(obj)
}
export function appendOrder(data) {
  const obj = {
    url: 'api/logisticsLoad/appendOrder',
    method: 'post',
    data
  }
  return request(obj)
}
export function accept(data) {
  const obj = {
    url: 'api/logisticsLoad/accept',
    method: 'post',
    data
  }
  return request(obj)
}

export function print(data) {
  const obj = {
    url: 'api/logisticsLoad/print',
    method: 'post',
    responseType: 'blob',
    data
  }
  return request(obj)
}

export function logisticsLoadGoodsPrint(data) {
  const obj = {
    url: 'api/logisticsLoad/logisticsLoadGoodsPrint',
    method: 'post',
    responseType: 'blob',
    data
  }
  return request(obj)
}

export function salesOrderPrint(data) {
  const obj = {
    url: 'api/logisticsLoad/salesOrderPrint',
    method: 'post',
    responseType: 'blob',
    data
  }
  return request(obj)
}

export function getReturnBottleBoxCollectSplitInfo(data) {
  const obj = {
    url: 'api/logisticsLoad/getReturnBottleBoxCollectSplitInfo?id=' + data.id,
    method: 'get',
    data
  }
  return request(obj)
}
export function splitReturnBottleBoxCollect(data) {
  const obj = {
    url: 'api/logisticsLoad/splitReturnBottleBoxCollect',
    method: 'post',
    data
  }
  return request(obj)
}
export function checkSplit(data) {
  const obj = {
    url: 'api/logisticsLoad/checkSplit',
    method: 'post',
    data
  }
  return request(obj)
}

export function customerReceipt(data) {
  const obj = {
    url: '/api/logisticsLoad/customerReceipt',
    method: 'post',
    data
  }
  return request(obj)
}
// 回箱审核/api/logisticsLoad/returnBoxPass
export function returnBoxPass(data) {
  const obj = {
    url: '/api/logisticsLoad/returnBoxPass',
    method: 'post',
    data
  }
  return request(obj)
}
// 回箱反审/api/logisticsLoad/returnBoxReject
export function returnBoxReject(data) {
  const obj = {
    url: '/api/logisticsLoad/returnBoxReject',
    method: 'post',
    data
  }
  return request(obj)
}

export function wareReturnBottleBoxaddOrSave(data) {
  const obj = {
    url: '/api/wareReturnBottleBox/addOrSave',
    method: 'post',
    data
  }
  return request(obj)
}

export function delWareReturnBottleBox(ids) {
  return request({
    url: '/api/wareReturnBottleBox',
    method: 'delete',
    data: ids
  })
}

export function batchCustomerReceipt(data) {
  const obj = {
    url: '/api/logisticsLoad/batchCustomerReceipt',
    method: 'post',
    data
  }
  return request(obj)
}

export function allCustomerReceipt(data) {
  const obj = {
    url: '/api/logisticsLoad/allCustomerReceipt',
    method: 'post',
    data
  }
  return request(obj)
}

export function updateSendAuditTime(data) {
  const obj = {
    url: '/api/logisticsLoad/updateSendAuditTime',
    method: 'post',
    data
  }
  return request(obj)
}
export function getLogisticsLoadPreviousNextPageIdList(data) {
  const obj = {
    url: '/api/logisticsLoad/getLogisticsLoadPreviousNextPageIdList',
    method: 'get',
    params: data
  }
  return request(obj)
}
export function orderRecycle(data) {
  const obj = {
    url: '/api/logisticsLoad/orderRecycle',
    method: 'post',
    data
  }
  return request(obj)
}

export function confirmRecycle(data) {
  const obj = {
    url: '/api/logisticsLoad/confirmRecycle',
    method: 'post',
    data
  }
  return request(obj)
}

export function customerMultiBankReceipt(data) {
  return request({
    url: '/api/logisticsLoad/customerMultiBankReceipt',
    method: 'post',
    data
  })
}

export function applyDebt(data) {
  const obj = {
    url: '/api/logisticsLoad/applyDebt',
    method: 'post',
    data
  }
  return request(obj)
}

export function confirmDebt(data) {
  const obj = {
    url: '/api/logisticsLoad/confirmDebt',
    method: 'post',
    data
  }
  return request(obj)
}
export default { checkSplit, splitReturnBottleBoxCollect, getReturnBottleBoxCollectSplitInfo, add, edit, copy, exportDe, importDe, del, passOrReject, enableOrDisable, basLineList, childBasCustomerAreaList, detail, removeOrder, removeCustomer, removeReturnBoxOrder, returnBox, unAccept, isReceipt, unReturnBox, appendOrder, accept, salesOrderPrint, print, logisticsLoadGoodsPrint, returnBoxPass, returnBoxReject, wareReturnBottleBoxaddOrSave, batchCustomerReceipt, batchRemoveOrder, updateSendAuditTime, applyDebt, confirmDebt }
